import request from '../utils/request'

export const add = (slug, body) => request({
    method: 'post',
    url: `/api/articles/${slug}/comments`,
    data: {
        comment: {
            body
        }
    }
})

export const get = slug => request({
    method: 'get',
    url: `/api/articles/${slug}/comments`
})

export const del = (slug, id) => request({
    method: 'delete ',
    url: `/api/articles/${slug}/comments/${id}`
})